"""author: wenyao
   data: 2020/10/20
   project: ludingji
"""

# for 变量名 in 序列表:
#     执行体

###########for##############
#输出对应字符串 小写输出0 大写输出1
# a = "abcEFGijk"
# for i in a:
#     print(i)

# str1 = input("请输入字符串：")
# result = ""
# for i in str1:
#     if i.isupper():
#         result +="1"
#         # print("1", end = "")
#     else:
#         result +="0"
# print("result:",result)


# str1 = input('输入字符串：')
# for i in str1:
#     print('1',end='') if i.isupper() else print ('0',end='')

#  用户登录验证
# 登录成功/失败都给予提示
# 最多可尝试3次密码
#=====================================



# 1-100的和
# a = 0
# for i in range(100):
#     a += i+1
# print(a)
#================猜数字====================
#

##================for 循环 且套for ===================
# for i in range(1,10):
#     for j in range(1,3):
#         print(i,j)

####################九九乘法表======================
# for i in range(1,10):
#     for j in range(1,i+1):
#         print(f"{j}*{i}={i*j}",end = " ")
#     print()

# for i in range(1,101):
#     if i % 2 == 1:
#          print(i, end = " ")

#水仙花数 是指一个三位数，其各个位数的立方和等于该数本身
#水仙花数 153 = 1的三次方 + 5的三次方 + 3的三次方
#找出100-999中的水仙花数

# for i in range(100,1000):
#     a = str(i)
#     if i == (int(a[0])**3+int(a[1])**3+int(a[2])**3):
#         print(i,end=" ")
#
# for i in range(100,1000):
#     # a = str(i)
#     if i == (i//100)**3 + (i//10%10)**3 + (i%10)**3:
#         print(i,end=" ")